/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.distribution;

import com.enation.app.javashop.client.distribution.DistributionGoodsClient;
import com.enation.app.javashop.core.client.fallback.distribution.DistributionGoodsClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.distribution.dos.DistributionGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 分销商品客户端
 *
 * @author liushuai
 * @version v1.0
 * @Description:
 * @since v7.0
 * 2018/8/14 下午1:31
 */
@FeignClient(name = "distribution-service", fallbackFactory = DistributionGoodsClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface DistributionGoodsClientFeignImpl extends DistributionGoodsClient {


    /**
     * 修改分销商品提现设置
     *
     * @param distributionGoods
     * @return
     */
    @Override
    @RequestMapping(value = "/client/distribution/goods/edit", method = RequestMethod.POST)
    DistributionGoods edit(@RequestBody DistributionGoods distributionGoods);

    /**
     * 获取分销设置
     *
     * @param goodsId
     * @return
     */
    @Override
    @RequestMapping(value = "/client/distribution/goods/{goods_id}", method = RequestMethod.POST)
    DistributionGoods getModel(@PathVariable("goods_id") Long goodsId);

    /**
     * 删除
     * @param id
     */
    @Override
    @RequestMapping(value = "/client/distribution/goods/{goods_id}/del", method = RequestMethod.POST)
    void delete(@PathVariable("goods_id")Long id);
}
